

var esgInputFileType = {
    0: "ReferenceUniverse",    
    1: "WeightMatrix",
    2: "KeyESGIssues",
    3: "FocusedRatings",
    4: "Portfolio"
}

var collection = db.getSiblingDB("ClientPlatform").EsgInputFile
collection.find({Type: { $type: 16 }}).forEach(function(item){

    item.Type = esgInputFileType[item.Type];

    collection.save(item);
})

